import { get, post } from '@/utils/axios'

const prefixUrl = '/gengerCode/'

/** 获取表所有列配置 */
export const getColumn = tableName => get(`${prefixUrl}getColumn`, { tableName })

/** 保存配置信息 */
export const configTable = (tableData, tableName) => post(`${prefixUrl}configTable`, {
  tableData, tableName
}, false)

/** 代码生成 */
export const genCode = tableName => get(`${prefixUrl}genCode`, { tableName })

/** 同步表 */
export const asynTable = tableName => get(`${prefixUrl}asynTable`, { tableName })
